<?php
declare(strict_types=1);

namespace App\Controller\WebApi\Common;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;
use App\Middleware\WebApiMiddleware;
use Hyperf\HttpServer\Annotation\Middleware;
use Service\Consumer\YunCangConsumer\Router\goodsChange;

/**
 * 推送商品
 * @author chenshubo
 * @Controller(prefix="/webapi/common/pushgoods")
 * @Middleware(WebApiMiddleware::class)
 */
class PushGoodsController extends AbstractController
{
    /**
     * 上传图片资源
     * @RequestMapping(path="rev", methods="POST")
     */
    public function rev(RequestInterface $request)
    {
        $data = $request->input('msg');
        $result = goodsChange::instance()->consumer($data['sid'],$data['cid'],$data['data'],$data['logid'],$data['IsFinished']??0);
        return $result;
    }
}